/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sh.ndt.exam.mapper;

import com.sh.ndt.common.mapper.BaseRowMapper;
import com.sh.ndt.exam.entity.ExamHistory;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Prashanth
 */
public class ExamHistoryMapper extends BaseRowMapper {

    @Override
    public Object mapRow(ResultSet rs, int i) throws SQLException {
        ExamHistory examHistory = null;
        
        examHistory = new ExamHistory();
        
        examHistory.setExamHistoryId(rs.getLong("exam_history_id"));
        examHistory.setUserId(rs.getLong("user_id"));
        examHistory.setExamId(rs.getLong("exam_id"));
        examHistory.setResult(rs.getInt("result"));
        examHistory.setExamDate(rs.getDate("exam_date"));
        
        return examHistory;
    
    }
    
}
